/**
 * Created by 李伟伟 on 2017/10/16.
 */
window.onload = function () {
    var code;
    show();
}
function show() {
    var long = 4;
    code = "";
    var span1 = document.getElementById("span1");
    var arr = new Array('1','2','3','4','5','6','7','8','9','0',
    'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','v','z',
    'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');
   for(var i = 0;i < long; i++){
       var m = Math.floor(Math.random()*(arr.length));
       code = code+arr[m];
   }
   if(span1){
       span1.innerHTML = code;
   }
}